<%@ Page Language="C#" MasterPageFile="~/Danser.Master" AutoEventWireup="true" CodeBehind="Queries.aspx.cs" Inherits="Danser_AJAXEnabledWebApplication.Queries" Title="Danser - Queries" %>

<%@ Register Src="User Controls/ExpressionBuilder.ascx" TagName="ExpressionBuilder" TagPrefix="uc1" %>
<%@ Register src="User Controls/MultiSelectList.ascx" tagname="MultiSelectList" tagprefix="uc2" %>
<%@ Register src="User Controls/GraphControl/GraphUserControl.ascx" tagname="GraphUserControl" tagprefix="uc3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <script language="javascript">
    function getLoadQueryRefresh()
    {
        var button = document.getElementById('<%=loadQueryRefreshButton.ClientID%>');
        return button;
    }
    
    function getSelectAnchorRefresh()
    {
        var button = document.getElementById('<%=selectAnchorRefreshButton.ClientID%>');
        return button;
    }

    </script>
    
    <asp:ScriptManager id="ScriptManager" runat="server"></asp:ScriptManager>
           
          
    <table width="100%">
        <tr>
            <td>
    <asp:Label ID="titleLabel" runat="server" CssClass="StandardLabel" Text="Perform Queries:"></asp:Label></td>
        </tr>
        <tr>
            <td style="height: 21px">
            </td>
        </tr>
        <tr>
            <td>

<asp:Panel ID="MainPanel" runat="server" BackColor="Lavender"
    Width="100%" BorderColor="MidnightBlue">
    <asp:ObjectDataSource ID="testInfoObjectDataSource" runat="server" 
        SelectMethod="GetTests" 
        
        TypeName="Danser_AJAXEnabledWebApplication.DataSourceManagers.TestInfoDataSourceManager">
        <SelectParameters>
            <asp:Parameter Name="filter" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <table width="100%">
        <tr>
            <td align="left" style="height: 34px" valign="middle">
                <asp:UpdatePanel ID="dataGridUpdatePanel" runat="server" 
                    UpdateMode="Conditional">
                    <ContentTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <table style="width:100%;">
                                        <tr valign="top">
                                            <td>
                                                <asp:Panel ID="testInfoFilterPanel" runat="server" Width="100%">
                                                    <table style="width:100%;">
                                                        <tr>
                                                            <td valign="top" width="200px">
                                                                <asp:Label ID="selectLabel" runat="server" Font-Bold="True" 
                                                                    Font-Names="Arial" Font-Size="10pt" ForeColor="MidnightBlue" 
                                                                    Text="Select columns to display:"></asp:Label>
                                                            </td>
                                                            <td align="left" valign="top" width="80px">
                                                                <uc2:MultiSelectList ID="columnsMultiSelectList" runat="server" />
                                                            </td>
                                                            <td align="left" valign="top">
                                                                <asp:Button ID="filterButton" runat="server" BackColor="MidnightBlue" 
                                                                    BorderColor="#C0C0FF" BorderStyle="Solid" BorderWidth="1px" 
                                                                    Font-Names="Arial" ForeColor="White" OnClick="filterButton_Click" 
                                                                    Text="Confirm" ToolTip="Display selected fields only" Width="70px" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </asp:Panel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="filterTestInfoButton" runat="server" CssClass="StandardButton" 
                                        onclick="filterTestInfoButton_Click" Text="Search Tests" Width="100px" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Panel ID="testInfoQueryPanel" runat="server" Visible="False">
                                        <table style="width:100%;">
                                            <tr>
                                                <td>
                                                    <uc1:ExpressionBuilder ID="testInfoQueryExpressionBuilder" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Button ID="executeTestInfoQueryButton" runat="server" 
                                                        CssClass="StandardButton" onclick="executeTestInfoQueryButton_Click" 
                                                        Text="SELECT" ToolTip="Execute query" />
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:GridView ID="testInfoGridView" runat="server" AllowPaging="True" 
                                        AutoGenerateColumns="False" BorderColor="White" BorderStyle="Solid" 
                                        BorderWidth="1px" DataKeyNames="TestInfoIndex" 
                                        DataSourceID="testInfoObjectDataSource" 
                                        EmptyDataText="&lt; No Entries to Display &gt;" 
                                        onrowdatabound="testInfoGridView_RowDataBound" Width="100%">
                                        <RowStyle BackColor="LightGray" BorderColor="White" BorderStyle="Solid" 
                                            BorderWidth="1px" Font-Names="Arial" HorizontalAlign="Center" 
                                            VerticalAlign="Middle" CssClass="StandardRowStyle" />
                                        <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                                        <Columns>
                                            <asp:TemplateField>
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="displayRowLinkButton" runat="server" 
                                                        Font-Names="Arial" Font-Size="11pt" Font-Underline="True" 
                                                        ForeColor="MidnightBlue" onclick="displayRowLinkButton_Click" 
                                                        ToolTip="Display results data for this test">Display data</asp:LinkButton>
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" Width="100px" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TestInfoIndex" HeaderText="ID" ReadOnly="True">
                                                <HeaderStyle BorderColor="White" BorderStyle="Solid" BorderWidth="1px" 
                                                    CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="30px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="TestName" HeaderText="Name" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="100px" 
                                                    HorizontalAlign="Center" VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="Date" HeaderText="Date" ReadOnly="True" 
                                                SortExpression="Date">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="Time" HeaderText="Time" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="Status">
                                                <ItemTemplate>
                                                    <asp:Label ID="validationStatusLabel" runat="server" Text="Failed"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" Width="60px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Failed Validations">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="failedValidationsTextBox" runat="server" 
                                                        Font-Names="Arial" Font-Size="10pt" ReadOnly="True" Rows="3" 
                                                        Width="95%"></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" Width="200px" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="Operator" HeaderText="Operator" ReadOnly="True" 
                                                SortExpression="Operator">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="APType" HeaderText="AP Type" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="APIP" HeaderText="AP IP" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="APFWVer" HeaderText="AP FW Ver" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NICMAC" HeaderText="NIC MAC" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="NICType" HeaderText="NIC Type" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ProjectName" HeaderText="Project" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="80px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="OS" HeaderText="OS" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="TIC" HeaderText="TIC" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="SetupName" HeaderText="Setup" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="80px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="PlatformName" HeaderText="Platform" ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="80px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="PlatformModel" HeaderText="Platform Model" 
                                                ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="80px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="TrafficProtocol" HeaderText="Traffic Protocol" 
                                                ReadOnly="True">
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" Width="60px" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" />
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="Confirmed">
                                                <ItemTemplate>
                                                    <asp:Label ID="confirmedLabel" runat="server" Font-Names="Arial" 
                                                        Font-Size="11pt" ForeColor="Red" Text='<%# Eval("isConfirmed") %>' 
                                                        ToolTip=" "></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" Width="80px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Anchor">
                                                <ItemTemplate>
                                                    <asp:Label ID="anchorLabel" runat="server" Font-Names="Arial" 
                                                        Font-Size="11pt" ForeColor="Red" Text='<%# Eval("isAnchor") %>' 
                                                        ToolTip=" "></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle CssClass="TableRowBorderStyle" />
                                                <ItemStyle CssClass="TableRowBorderStyle" HorizontalAlign="Center" 
                                                    VerticalAlign="Middle" Width="80px" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <HeaderStyle BackColor="#C0C0FF" BorderColor="White" BorderStyle="Solid" 
                                            BorderWidth="1px" Font-Bold="True" Font-Names="Arial" 
                                            Font-Size="12pt" ForeColor="MidnightBlue" HorizontalAlign="Center" 
                                            VerticalAlign="Middle" />
                                        <EditRowStyle CssClass="StandardRowStyle" />
                                        <AlternatingRowStyle BackColor="Gainsboro" BorderColor="White" 
                                            BorderStyle="Solid" BorderWidth="1px" CssClass="StandardRowStyle" />
                                        <PagerStyle CssClass="StandardPagerStyle" Font-Bold="True" 
                                            Font-Names="Arial" Font-Overline="False" Font-Size="12pt" 
                                            Font-Underline="False" ForeColor="MidnightBlue" HorizontalAlign="Center" 
                                            VerticalAlign="Middle" />
                                    </asp:GridView>
                                    &nbsp;&nbsp;&nbsp;
                                </td>
                            </tr>
                            <tr> 
                                <td>
                                                <asp:UpdateProgress ID="loadingResultsUpdateProgress" runat="server" 
                    AssociatedUpdatePanelID="dataGridUpdatePanel" DisplayAfter="1500">
                    <ProgressTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td width="20">
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Resourses/Images/info.bmp" />
                                </td>
                                <td>
                                    <asp:Label ID="waitLabel" runat="server" Font-Bold="False" 
                                        Font-Names="Arial" Font-Size="10pt" ForeColor="Black" 
                                        Text="Please wait while executing..."></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                                </td>
                            </tr>
                            <tr>
                                <!--Test result ODS row-->
                                <td>
                                    <asp:ObjectDataSource ID="testResultsObjectDataSource" runat="server" 
                                        SelectMethod="GetTests" 
                                        TypeName="Danser_AJAXEnabledWebApplication.DataSourceManagers.TestResultsDataSourceManager">
                                        <SelectParameters>
                                            <asp:Parameter Name="filter" Type="String" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                    <asp:Button ID="toggleDisplayModeButton" runat="server" 
                                        CssClass="StandardButton" onclick="toggleDisplayModeButton_Click" 
                                        Text="Graph Display" Width="120px" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="testResultsPanel" runat="server" Visible="true">
                            <asp:Panel ID="numericResultsDataPanel" Visible="false" runat="server">
                            <table style="width:100%;">
                                <tr>
                                    <td>
                                        <asp:Panel ID="testResultsFilterPanel" runat="server" Width="100%">
                                            <table style="width:100%;">
                                                <tr>
                                                    <td valign="top" width="200px">
                                                        <asp:Label ID="selectLabel0" runat="server" Font-Bold="True" 
                                                            Font-Names="Arial" Font-Size="10pt" ForeColor="MidnightBlue" 
                                                            Text="Select columns to display:"></asp:Label>
                                                    </td>
                                                    <td align="left" valign="top" width="80px">
                                                        <uc2:MultiSelectList ID="testResultColumnsMultiSelectList" runat="server" />
                                                    </td>
                                                    <td align="left" valign="top">
                                                        <asp:Button ID="filterButton0" runat="server" BackColor="MidnightBlue" 
                                                            BorderColor="#C0C0FF" BorderStyle="Solid" BorderWidth="1px" 
                                                            Font-Names="Arial" ForeColor="White" 
                                                            OnClick="testResultfilterButton_Click" Text="Confirm" 
                                                            ToolTip="Display selected fields only" Width="70px" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:Panel>
                                    </td>
                                </tr>
                    <table style="width:100%;">
                    <tr>
                        <td>
                            <asp:Button ID="filterTestResultsButton" runat="server" 
                                CssClass="StandardButton" onclick="filterTestResultButton_Click" 
                                Text="Search Results" Width="110px" />
                        </td>
                    </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                    <tr>
                       <asp:Panel ID="testResultQueryPanel" runat="server" Visible="False">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <uc1:ExpressionBuilder ID="testResultQueryExpressionBuilder" runat="server" />
                                </td>
                            </tr>
                            <tr>
<td>
    <asp:Button ID="executeTestResultQueryButton" runat="server" 
        CssClass="StandardButton" onclick="executeTestResultQueryButton_Click" 
        Text="SELECT" ToolTip="Execute query" Width="90px" />
    &nbsp;&nbsp;
    <asp:Button ID="loadQueryButton" runat="server" CssClass="StandardButton" 
        onclick="loadQueryButton_Click" Text="Load Query" Width="90px"
        onClientClick="window.open('./Query Popups/LoadQuery.aspx', '', 'status=1,scrollbars=1,resizable=0,width=735,height=440');"/>
        
    &nbsp;&nbsp;
    <asp:Button ID="saveQueryButton" runat="server" CssClass="StandardButton" 
        Text="Save Query" Width="90px" Enabled="false"
        onClientClick="window.open('./Query Popups/SaveQuery.aspx', '', 'status=1,scrollbars=1,resizable=0,width=475,height=460');"/>
</td>
                            </tr>
                          </table>
                        </asp:Panel>
                    </tr>
                </table>
<tr>
<td>
</td>
</tr>
                            </table>
                            <asp:GridView ID="testResultsGridView" runat="server" AutoGenerateColumns="False" 
                                DataKeyNames="TestParamsIndex,TestInfoIndex,Attenuation" 
                                DataSourceID="testResultsObjectDataSource" 
                                EmptyDataText="-- No data to display --" Width="100%" 
                                AllowPaging="True" PageSize="50" BorderColor="Black" BorderStyle="Solid" 
                                    BorderWidth="1px" onrowcreated="testResultsGridView_RowCreated">
                                <RowStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="10pt" />
                                <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                                <Columns>
                                    <asp:BoundField DataField="Channel" HeaderText="Channel" ReadOnly="True" 
                                        SortExpression="Channel">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ChannelWidth" HeaderText="Channel Width" 
                                        ReadOnly="True" SortExpression="ChannelWidth">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Band" HeaderText="Band" ReadOnly="True" 
                                        SortExpression="Band">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Attenuation" HeaderText="Attenuation" 
                                        SortExpression="Attenuation">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RXMin" HeaderText="RX Min" ReadOnly="True" 
                                        SortExpression="RXMin">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RXAvg" HeaderText="RX Avg" ReadOnly="True" 
                                        SortExpression="RXAvg">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RXMax" HeaderText="RX Max" ReadOnly="True" 
                                        SortExpression="RXMax">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="TXMin" HeaderText="TX Min" ReadOnly="True" 
                                        SortExpression="TXMin">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="TXAvg" HeaderText="TX Avg" ReadOnly="True" 
                                        SortExpression="TXAvg">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="TXMax" HeaderText="TX Max" ReadOnly="True" 
                                        SortExpression="TXMax">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RSSI1" HeaderText="RSSI 1" ReadOnly="True" 
                                        SortExpression="RSSI1">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RSSI2" HeaderText="RSSI 2" ReadOnly="True" 
                                        SortExpression="RSSI2">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RSSI3" HeaderText="RSSI 3" ReadOnly="True" 
                                        SortExpression="RSSI3">
                                        <HeaderStyle CssClass="ResultsRowBorderStyle" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                </Columns>
                                <PagerStyle BackColor="#CCCCFF" Font-Bold="True" Font-Names="Arial" 
                                    Font-Size="10pt" ForeColor="MidnightBlue" HorizontalAlign="Center" 
                                    VerticalAlign="Middle" />
                                <HeaderStyle BackColor="#CCCCFF" BorderColor="Black" BorderStyle="Solid" 
                                    Font-Bold="True" Font-Names="Arial" 
                                    Font-Size="10pt" ForeColor="MidnightBlue" BorderWidth="1px" 
                                    HorizontalAlign="Center" VerticalAlign="Middle" />
                                <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" 
                                    Font-Size="10pt" />
                            </asp:GridView>
                        </asp:Panel>
                        <asp:Panel ID="graphResultsDataPanel" Visible="false" runat="server" 
                                BorderColor="MidnightBlue" BorderStyle="Solid" BorderWidth="1px">
                            <table style="width: 100%;">
                                <tr>
                                    <td>
                                        <br/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table style="width:100%;">
                                            <tr>
                                                <td class="style14">
                                                    <asp:Button ID="selectAnchorsButton" runat="server" CssClass="StandardButton" 
                                                        onClientClick="window.open('./Query Popups/SelectAnchors.aspx', '', 'status=1,scrollbars=1,resizable=0,width=850,height=440');" 
                                                        Text="Compare To Anchor" 
                                                        ToolTip="select an anchor to compare with these results" Visible="true" 
                                                        Width="136px" />
                                                </td>
                                                <td>
                                                    <asp:Button ID="removeAnchorButton" runat="server" CssClass="StandardButton" 
                                                        Enabled="False" onclick="removeAnchorButton_Click" Text="Clear Anchor" 
                                                        ToolTip="remove selected anchor results from comparison" Width="114px" />
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <uc3:GraphUserControl ID="QueriesGraphUserControl" runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="filterButton" />
                        <asp:AsyncPostBackTrigger ControlID="loadQueryRefreshButton" 
                            EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="selectAnchorRefreshButton" 
                            EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Panel>
            </td>
        </tr>
        </table>
        
        <asp:Button ID="loadQueryRefreshButton" runat="server" onclick="loadQueryRefreshButton_Click" 
            Text="hiddenButton" style="visibility:hidden"/>
        <asp:Button ID="selectAnchorRefreshButton" runat="server" onclick="selectAnchorRefreshButton_Click" 
            Text="hiddenButton" style="visibility:hidden"/> 
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">

    <style type="text/css">
        .style14
        {
            width: 162px;
        }
    </style>

</asp:Content>

